<template>
	<!-- 一个个的商品 -->
	<view class="goods-item">
		<view @click="goDetail">
			<image :src="Goods.show.img" lazy-load></image>
			<view class="info">
				<text>{{ Goods.title }}</text>
				<text class="price">{{ '￥' + Goods.price }}</text>
				<view class="love">
					<image src="../../static/otherImage/love.png"></image>
					<text class="collage">{{ Goods.cfav }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			Goods: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		methods: {
			goDetail(){
				uni.navigateTo({
						url: "/pages/detail/detail?iid=" + this.Goods.iid,
					})
				}
			}
		
	}
</script>

<style lang="less">
	.goods-item {
		box-sizing: border-box;
		width: 100%;

		/* #ifdef H5 */
		width: 50%;
		/* #endif */
		padding: 14rpx;

		image {
			width: 100%;
			border-radius: 20rpx;
		}

		.info {
			overflow: hidden;
			text-overflow: ellipsis;
			padding: 10rpx;
			overflow: hidden;

			text:first-child {
				font-size: 26rpx;
				white-space: nowrap;
			}

			.price {
				margin-top: 2rpx;
				font-size: 26rpx;
			}

			.love {
				margin-top: 2rpx;
				display: inline-block;
				transform: translateX(80rpx);

				image {
					height: 30rpx;
					width: 30rpx;
					transform: translateY(4rpx);
					margin-right: 12rpx;
				}

				.collage {
					font-size: 26rpx;
				}
			}


		}
	}
</style>
